<div id="category-contain" class="ui-widget">
<div><span><b>当前位置:</b></span><?php echo '<b>&nbsp;&nbsp;'.$result_supplier_name.'</b>'?></div>
<table id="category" class="ui-widget ui-widget-content">
	<thead>
		<tr class="ui-widget-header ">
			<th><input type="checkbox" onclick="changeSelectAll(this,'checkSubKey');"></th>
			<th>菜系名称</th>
			<th>操作</th>
		</tr>
	</thead>
	<tbody>
	<?php
	foreach ($result_dish_category as $item) {
		echo '<tr><td><input type="checkbox" class="checkSubKey" key="'.$item->id.'"/></td>';
		echo '<td>'.$item->displayDishCategoryName().'</td>';
		echo '<td>';
		echo '<a style="color:blue" dishCateId = "'.$item->id.'" dishCateName = "'.$item->name.'" title="修改" href="javascript:void(0)" onclick="editDishCate(this)">修改</a>';
		echo '&nbsp;|&nbsp;';
		echo '<a style="color:blue" title="管理菜色" href="javascript:void(0)" onclick="showDishByCate('.$item->id.')">管理菜色</a>';
		if (!empty($item->copyfrom)){
			echo '&nbsp;|&nbsp;';
			echo '<a style="color:blue" title="去掉复制标示" href="javascript:void(0)" onclick="removeCopyFlag(\'dishCategory\','.$item->id.')">去掉复制标示</a>';
		}
		echo '</td></tr>';
	}
	?>
	</tbody>
</table>
</div>
<button id="create-dish-category-btn">增加菜系</button>
<button id="delete-dish-category-btn">删除选中菜系</button>
<br/>
<select id="combobox" name="membersupplier">
	<?php 
		$result_suppliers = ORM::factory("supplier")->where("status","<>","I")->find_all();
		foreach ($result_suppliers as $item){
			echo '<option value="'.$item->id.'"';
			echo '>'.$item->displaySupplierName().'</option>';
		}
	?>
</select>
<button id="copy-dish-category-btn">复制选中菜系</button>
<style>
	.ui-button { margin-left: -1px; }
	.ui-button-icon-only .ui-button-text { padding: 0.35em; } 
	.ui-autocomplete-input { margin: 0; padding: 0.48em 0 0.47em 0.45em; width :50%}
</style>
<script type="text/javascript" src="<?php echo URL::base()?>js/self_autocomplete.js"></script>
<script>
$(function() {
	$( "#combobox" ).combobox();
});
</script>